<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/templateInventario.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Detalle de Ingresos</f:facet>

        <s:decorate id="ingCodigo" template="layout/display.xhtml">
            <ui:define name="label">N# Ingreso:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingCodigo}"/>
        </s:decorate>
        <s:decorate id="ingDescuento" template="layout/display.xhtml">
            <ui:define name="label">Descuento:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingDescuento}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="ingFecha" template="layout/display.xhtml">
            <ui:define name="label">Fecha:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingFecha}">
                <s:convertDateTime type="date" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        

        <s:decorate id="ingIva" template="layout/display.xhtml">
            <ui:define name="label">Iva:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingIva}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="ingNumFactura" template="layout/display.xhtml">
            <ui:define name="label">N# Factura:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingNumFactura}"/>
        </s:decorate>

        
        <s:decorate id="ingPrecioTotal" template="layout/display.xhtml">
            <ui:define name="label">Precio</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingPrecioTotal}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

<s:decorate id="ingObservacion" template="layout/display.xhtml">
            <ui:define name="label">Observacion:</ui:define>
            <h:outputText value="#{invIngresoHome.instance.ingObservacion}"/>
        </s:decorate>

        <div style="clear:both"/>
<rich:dataTable value="#{ingresoItemsListado}" var="row" style="width : 764px; height : 57px;">
                   <rich:column>
                                <f:facet name="header">
                                        <h:outputText value="Items" />
                                        
                                </f:facet>
                                  <h:outputText value="#{row.iniNombre}" />
                   </rich:column>
                         <rich:column>
                                <f:facet name="header">
                                        <h:outputText value="Cantidad" size="3" />
                                </f:facet>  
                                   <h:outputText value="#{row.iniCantidad}" />
                                   </rich:column>
                        <rich:column>
                                <f:facet name="header">
                                        <h:outputText value="Costo Unitario" />
                                </f:facet>
                                
                                 <h:outputText value="#{row.iniCostoU}" />
                        </rich:column>
       					 <rich:column>
                                <f:facet name="header">
                                        <h:outputText value="Costo Total" />
                                </f:facet>
                                  <h:outputText value="#{row.iniCostoT}" />
                        </rich:column>
                </rich:dataTable>
    </rich:panel>
<s:decorate id="Total1" template="layout/edit.xhtml">
                <ui:define name="label">Total:</ui:define>
                <h:outputText  id="total" 
                value="#{invIngresoHome.instance.varTotalIngresoNeto}" >
             
                </h:outputText>
                   </s:decorate>
    <div class="actionButtons">

        <s:button view="/#{empty invIngresoFrom ? 'InvIngresoList' : invIngresoFrom}.xhtml"
                    id="done"
                 value="Regresar"/>

    </div>

    <rich:tabPanel switchType="ajax">
</rich:tabPanel>
</ui:define>

</ui:composition>
